<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="layout/template.xhtml">

	<ui:define name="title">Gestion des absences</ui:define>

	<ui:define name="contenu">

		<ui:fragment rendered="#{login.isAdmin()}">
			<h1>
				Ajouter une activité pour
				<h:outputText value="#{etudiantEntrepriseBean.etudiantEnt}" />
			</h1>
			<h:form>
				<h:inputHidden id="etudiantCaché"
					value="#{etudiantEntrepriseBean.etudiantEnt.id}" />
				<h:outputLabel for="entreprise" value="Entreprise : " />
				<h:selectOneMenu
					value="#{etudiantEntrepriseBean.entrepriseItemSelect}">
					<f:selectItems value="#{etudiantEntrepriseBean.entreprisesItems}" />
				</h:selectOneMenu>
				<h:outputLabel for="dateDebut" value="Date Début : " />

				<p:calendar id="dateDebut"
					value="#{etudiantEntrepriseBean.etudiantEntrepriseId.datedebut}"
					navigator="true" locale="fr" pattern="yyyy-MM-dd">
					<f:convertDateTime pattern="yyyy-mm-dd" />
				</p:calendar>

				<br />
				<h:outputLabel for="dateFin" value="Date Fin : " />

				<p:calendar id="dateFin"
					value="#{etudiantEntrepriseBean.etudiantEntreprise.datefin}"
					navigator="true" locale="fr" pattern="yyyy-MM-dd">
					<f:convertDateTime pattern="yyyy-mm-dd" />
				</p:calendar>

				<br />
				<h:outputLabel for="description" value="Description : " />
				<h:inputText id="description" label="description"
					value="#{etudiantEntrepriseBean.etudiantEntreprise.description}" />
				<br />
				<h:outputLabel for="poste" value="Poste : " />
				<h:inputText id="poste" required="true" label="poste"
					value="#{etudiantEntrepriseBean.etudiantEntreprise.posteoccupe}" />
				<br />
				<h:outputLabel for="type" value="Type contrat : " />
				<h:selectOneMenu value="#{etudiantEntrepriseBean.contratItemSelect}">
					<f:selectItems value="#{etudiantEntrepriseBean.contratsItems}" />
				</h:selectOneMenu>
				<br />

				<h:commandButton value="Ajouter"
					action="#{etudiantEntrepriseBean.ajout()}" />
			</h:form>
		</ui:fragment>


	</ui:define>

</ui:composition>
</html>